Method for recognizing abnormal image

ABSTRACT

A method for recognizing abnormal image is disclosed. The invention utilizes level comparisons of adjacent image lines to determine if there is any abnormal image amid an image picture and whether the abnormal image belongs to shading or LBB. The method comprises the following steps. First of all, two adjacent image lines having level values P i  and P i−1  are selected. Then an absolute value of the P i  and the P i−1  is calculated. Next the absolute value is compared with a value X. When the absolute value is smaller than X, then the image lines are determined as normal. On the contrary, when the absolute value is larger than X, then at least one of the image lines is determined as abnormal. Moreover, another two image lines having level values P i+1  and P i−2  separately adjacent the image lines having level values P i  and the P i−1  are selected. An absolute value of the P i+1  and the P i−2  is calculated and the absolute value of the P i+1  and the P i−2  is compared to the value X. When the absolute value of the P i+1  and the P i−2  is smaller than X, then the image lines having level values P i  and P i−1  are determined as shading. However, when the absolute value of the P i+1  and the P i−2  is larger than X, then the image lines having level values P i , P i−1 , P i+1  and P i−2  are determined as LBB.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to a method for recognizing an abnormal image, and more particularly to a method for recognizing an abnormal image which is generated by LBB or shading.

[0003] 2. Description of the Related Art

[0004] Optical scanners are used to capture and digitize images. For example, an optical scanner can be used to capture the image of printed matter on a sheet of paper. The digitized image can then be electronically stored and/or processed with character recognition software to produce ASCII text. The typical optical scanner includes a light source, a linear array of photoelectric sensing elements (generally a CCD sensor or a CMOS sensor, or a CIS sensor), an analog amplifier, an analog to digital converter (ADC), a controller and a random access memory (RAM).

[0005] The CCD sensor includes a large number (e.g., 2000) of photoelectric sensing elements arranged in a linear array. Each photoelectric sensing element will capture light representing a single pixel of the image. The array will capture a line of pixels. By moving the CCD sensor across a document, the entire document can be scanned one line at a time.

[0006] The conversion into digital signals of light reflected from or transmitted through the document takes place in essentially three steps. First, each photoelectric sensing element will convert the light which it receives into an electric charge. The magnitude of the charge will depend on the intensity of the light and the exposure time. Second, the charges from each of the photoelectric sensing elements are converted into analog voltages via the analog amplifier. Finally, the analog voltages are digitized by the analog to digital converter for digital image processing and storage in the RAM.

[0007] As shown in FIG. 1, a conventional image scanner is shown. A light beam is emitted from a light source 102 and reflected by a reflector 104. The light beam then exposes a document sheet 112 and is reflected by the document sheet 112. The reflected light beam then is reflected sequentially by mirrors 106 a and 106 b. The image of the document sheet 112 carried by the light beam is transmitted to charge-coupled devices 110 through a lens 108. Under perfect circumstance, the image of a document sheet should not present dark lines or bands in a bright field as well as bright lines or bands in a dark field. As shown in FIG. 2, a dark band 202 and several dark lines 206 show up a bright field 202. The width of the dark band 204 is larger than a pixel and the dark band 204 is called LBB. The dark line 206 having a width equal to a pixel is called shading. LBB is usually induced from obstacles in the transmitting path of the light beam between the charge-coupled devices 110 and the light source 102. The obstacles could be, for example, some dust on the mirrors 106 a and 106 b or the lens 108. Shading is usually caused by bad pixels (CCD) in the charge-coupled devices 110. It is therefore that the reasons separately causing LBB and shading are extremely different since one relates to malfunction of devices and the other dose not. Accordingly, it is important for an operator or a manufacturer of an image scanner to recognize and tell LBB from shading or vice versa since individual maintenance level needed is contrary. It is desirable to provide a method for recognizing abnormal image which is generated by LBB or shading so as to render an operator or a manufacturer of an image scanner easier to restore normal functions of the image scanner.

SUMMARY OF THE INVENTION

[0008] It is therefore an object of the invention to provide a method for recognizing an abnormal image so as to render an operator or a manufacturer of an image scanner easier to tell LBB from shading and restore normal functions of the image scanner.

[0009] It is another object of this invention to provide an automatic bad image identification process to render an operator or a manufacturer of an image scanner more efficient to troubleshoot bad images.

[0010] It is a further object of this invention to provide a convenient and low-cost process to detect image faults.

[0011] To achieve these objects, and in accordance with the purpose of the invention, the invention provide a method for recognizing an abnormal image, the method comprises the following steps. First of all, two adjacent image lines having level values P_(i) and P_(i−1) are selected. Then an absolute value of the P_(i) and the P_(i−1) is calculated. Next the absolute value is compared with a value X. When the absolute value is smaller than X, then the image lines are determined as normal. On the contrary, when the absolute value is larger than X, then at least one of the image lines is determined as abnormal. Moreover, another two image lines having level values P_(i+1) and P_(i−2) separately adjacent the image lines having level values P_(i) and the P_(i−1) are selected. An absolute value of the P_(i+1) and the P_(i−2) is calculated and the absolute value of the P_(i+1) and the P_(i−2) is compared to the value X. When the absolute value of the P_(i+1) and the P_(i−2) is smaller than X, then the image lines having level values P_(i) and P_(i−1) are determined as shading. However, when the absolute value of the P_(i+1) and the P_(i−2) is larger than X, then the image lines having level values P_(i), P_(i−1), P_(i+1) and P_(i−2) are determined as LBB.

[0012] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The foregoing aspects and many of the attendant advantages of this invention will become more readily appreciated as the same becomes better understood by reference to the following detailed description, when taken in conjunction with the accompanying drawings, wherein:

[0014]FIG. 1 shows a conventional image scanner;

[0015]FIG. 2 shows a dark band and several dark lines on a bright field;

[0016]FIG. 3 shows a diagram of bright level versus pixel showing shading;

[0017]FIG. 4 shows a diagram of bright level versus pixel showing LBB; and

[0018]FIG. 5 shows a flow chart of this invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

[0019] It is to be understood and appreciated that the method for recognizing an abnormal image described below do not cover a complete system and method. The present invention can be practiced in conjunction with various software and hardware that are used in the art, and only so much of the commonly practiced components and steps are included herein as are necessary to provide an understanding of the present invention.

[0020] The present invention will be described in detail with reference to the accompanying drawings. It should be noted that the drawings are in greatly simplified form.

[0021] Referring to FIG. 3, a diagram of bright level versus pixel showing shading is shown. The diagram is made by scanning a blank sheet. As shown in FIG. 3, the red light level of image line at pixel 10 is lower than the green light level and blue light level. The most likely reason of shading is malfunction of CCD array which is used to receive red light at pixel 10. FIG. 4 shows a diagram of bright level versus pixel showing LBB. This diagram is also made by scanning a blank sheet. As shown in FIG. 4, the red, green and blue light levels of image lines at pixels 6-12 are abnormal and lower. LBB is possibly caused by foreign obstacles and rarely induced by inside malfunctions of an image scanner.

[0022] Referring to FIG. 5, a flow chart of this invention is shown. The method for recognizing an abnormal image which is generated by LBB or shading starts in step 502. In step 504, any two image lines having significant bright level difference are selected and compute absolute value of the bright level difference. If the absolute value of the bright level difference is smaller than a predetermined value X, then the bright level difference is ignored and these two image lines are treated as normal. For example, if image line i has a bright level P_(i)=200, image line i−1 adjacent image line i has a bright level P_(i−1)=201 and X=3, then the compute is ABS (P_(i)−P_(i−1))<X or |200-201|=1<3. On the contrary, if the bright level difference of selected two adjacent image lines i and i−1 is larger than X or ABS (P_(i)−P_(i−1))>X, then another two image lines i−2 and i+1 separately adjacent image lines i and i−1 are selected and compute absolute value of the bright level difference in step 508. For example, if image line i has a bright level P_(i)=200, image line i−1 adjacent image line i has a bright level P_(i−1)=204 and X=3, then the compute is ABS (P_(i)−P_(i−1))>X or |200-204|=4>3. If image line i+1 next to image line i has a bright level P_(i+1)=200, image line i−2 adjacent image line i−1 has a bright level P_(i−2)=202, then the level difference of image line i and image line i−1 is determined as shading in step 512 and the compute is ABS (P_(i+1)−P_(i−2))<X or |200-202|=2<3. In stead, if image line i+1 has a bright level P_(i+1)=200, image line i−2 has a bright level P_(i−2)=205, then the level difference of image line i and image line i−1 together with the level difference of image line i+1 and image line i−2 are determined as LBB in step 510 and the compute is ABS (P_(i+1)−P_(i−2))>X or |200-205|=5>3.

[0023] Other embodiments of the invention will appear to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. It is intended that the specification and examples to be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims. 

What is claim is:
 1. A method for recognizing an abnormal image, said method comprising: selecting two adjacent image lines having level values P_(i) and P_(i−1); calculating an absolute value of said P_(i) and said P_(i−1); and comparing said absolute value with a value X, when said absolute value is smaller than said value X, then said two image lines determined as normal, when said absolute value is larger than said value X, then said two image lines determined as abnormal.
 2. The method according to claim 1, when said absolute value is larger than said value X, two image lines having level values P_(i+1) and P_(i−2) separately adjacent said image lines having level values P_(i) and said P_(i−1) are selected, an absolute value of said P_(i+1) and said P_(i−2) is calculated, and said absolute value of said P_(i+1) and said P_(i−2) is compared to said value X.
 3. The method according to claim 2, when said absolute value of said P_(i+1) and said P_(i−2) is smaller than X, then said image lines having level values P_(i) and P_(i−1) are determined as shading.
 4. The method according to claim 2, when said absolute value of said P_(i+1) and said P_(i−2) is larger than X, then said image lines having level values P_(i), P_(i−1), P_(i+1) and P_(i−2) are determined as LBB.
 5. A method for recognizing an abnormal image, said method comprising: selecting two adjacent image lines having level values P_(i) and P_(i−1); calculating an absolute value of said P_(i) and said P_(i−1); comparing said absolute value with a value X; selecting two image lines having level values P_(i+1) and P_(i−2) separately adjacent said image lines having level values P_(i) and said P_(i−1); calculating an absolute value of said P_(i+1) and said P_(i−2); and comparing said absolute value of said P_(i+1) and said P_(i−2) to said value X.
 6. The method according to claim 5, when said absolute value of said P_(i) and said P_(i+1) is smaller than said value X, then said two image lines having level values P_(i) and P_(i−1) are determined as normal.
 7. The method according to claim 5, when said absolute value of said P_(i) and said P_(i−1) is larger than said value X, then said two image lines having level values P_(i) and P_(i−1) are determined as abnormal.
 8. The method according to claim 5, when said absolute value of said P_(i+1) and said P_(i−2) is smaller than X, then said image lines having level values P_(i) and P_(i−1) are determined as shading.
 9. The method according to claim 5, when said absolute value of said P_(i+1) and said P_(i−2) is larger than X, then said image lines having level values P_(i), P_(i−1), P_(i+1) and P_(i−2) are determined as LBB.
 10. A method for recognizing an abnormal image, said method comprising: selecting two adjacent image lines having level values P_(i) and P_(i−1); calculating an absolute value of said P_(i) and said P_(i−1); comparing said absolute value of said P_(i) and said P_(i−1) with a value X; selecting two image lines having level values P_(i+1) and P_(i−2) separately adjacent said image lines having level values P_(i) and said P_(i−1), when said absolute value of said P_(i) and said P_(i−1) is larger than said value X; calculating an absolute value of said P_(i+1) and said P_(i−2); and comparing said absolute value of said P_(i+1) and said P_(i−2) to said value X.
 11. The method according to claim 10, when said absolute value of said P_(i) and said P_(i−1) is smaller than said value X, then said two image lines having level values P_(i) and P_(i−1) are determined as normal.
 12. The method according to claim 10, when said absolute value of said P_(i+1) and said P_(i−2) is smaller than X, then said image lines having level values P_(i) and P_(i−1) are determined as shading.
 13. The method according to claim 10, when said absolute value of said P_(i+1) and said P_(i−2) is larger than X, then said image lines having level values P_(i), P_(i−1), P_(i+1) and P_(i−2) are determined as LBB. 